<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网页导航</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .web-nav {
            width: 640px;
            height: 50px;
            background-color: #ffc0cb;
        }

        .web-nav ul {
            list-style: none;
            display: flex;
            height: 100%;
            width: 100%;
            justify-content: center;
            align-items: center;

        }

        .web-nav li {
            width: 80px;
            height: 100%;
            text-align: center;
            line-height: 50px;
        }

        .web-nav li a {
            text-decoration: none;
            color: aliceblue;
            font-size: 16px;
            /* margin-left: 10px; */
        }

        .web-nav li:hover {
            background-color: #008000;
        }
    </style>
</head>

<body>
    <div class="web-nav">
        <ul>
            <li><a href="#">新闻1</a></li>
            <li><a href="#">新闻2</a></li>
            <li><a href="#">新闻3</a></li>
            <li><a href="#">新闻4</a></li>
            <li><a href="#">新闻5</a></li>
            <li><a href="#">新闻6</a></li>
            <li><a href="#">新闻7</a></li>
            <li><a href="#">新闻8</a></li>
        </ul>
    </div>
</body>

</html>